<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<meta charset="utf-8">
<title>部门列表</title>
<link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="stylesheets/theme.css">
<link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css">
<script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script>


<style type="text/css">
#line-chart {
	height: 300px;
	width: 800px;
	margin: 0px auto;
	margin-top: 1em;
}

.brand {
	font-family: georgia, serif;
}

.brand .first {
	color: #ccc;
	font-style: italic;
}

.brand .second {
	color: #fff;
	font-weight: bold;
}
</style>

</head>

<body class="">

	<div class="content">

		<div class="header">

			<h1 class="page-title">部门列表</h1>
		</div>

		<ul class="breadcrumb">
			<li><a href="index.html">主页</a> <span class="divider">/</span></li>
			<li class="active">部门列表</li>
		</ul>

		<div class="container-fluid">
			<div class="row-fluid">
				<div>
				<form action="<%=basePath%>servlet/DeptServlet?mark=findById" method="post">
        		<input type="text" id="dno" name="dno" style="height:26px"/>
        		<input type="submit" name="" style="padding:2px;width:60px;" class="btn-primary" value="查询"/>
        		</form>
				</div>
				<div class="well">
					<table class="table">
						<thead>
							<tr>
								<th>ID</th>
								<th>部门编号</th>
								<th>部门名称</th>
								<th>部门描述</th>
								<th style="width: 50px;">编辑</th>
							</tr>
						</thead>
						<tbody>

							<c:forEach items="${list}" var="list">
								<tr>
									<td>${list.id}</td>
									<td>${list.dno}</td>
									<td>${list.dname}</td>
									<td>${list.ddesc}</td>
									<td><a href="<%=basePath%>servlet/DeptServlet?mark=toUpdate&dno=${list.dno}"><i class="icon-pencil"></i></a> 
									<a href="<%=basePath%>servlet/DeptServlet?mark=delete&id=${list.id}" onclick="return confirm('确认要删除？')"><i class="icon-remove"></i></a>
									</td>
								</tr>
							</c:forEach>

						</tbody>
					</table>
				</div>

			</div>
		</div>
	</div>



	<script src="js/lib/bootstrap/js/bootstrap.js"></script>
	<script type="text/javascript">
		$("[rel=tooltip]").tooltip();
		$(function() {
			$('.demo-cancel-click').click(function() {
				return false;
			});
		});
	    
	</script>

</body>
</html>
